// Copyright 2007 the original author or authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package lichen.services.blob;

import lichen.entities.IBlobModel;
import lichen.hibernate.EntityService;

/**
 * 可以在blob实体的save之前执行的一个方法
 * <p>在保存blob之前，给用户一个对blob实体执行某些操作的机会
 * 
 * @author <a href=mailto:Ghostbb@bjmaxinfo.com>Ghostbb</a>
 * @version $Revision$
 * @since 0.0.3
 */
public interface IBlobAroundSaveCallBack<T extends IBlobModel> {
	/**
	 * save blob对象之前执行操作
	 * @param blob
	 * @since 0.0.3
	 */
	public void doBeforeSaveBlob(T blob, EntityService service);
	
	/**
	 * save blob对象之后执行操作
	 * @param blob
	 * @param service
	 * @since 0.0.3
	 */
	public void doAfterSaveBlob(T blob, EntityService service);
}
